﻿using System;

class QuadraticEquation
{
    static void Main()
    {
        Console.Write("a = ");
        double a = double.Parse(Console.ReadLine());
        Console.Write("b = ");
        double b = double.Parse(Console.ReadLine());
        Console.Write("c = ");
        double c = double.Parse(Console.ReadLine());

        if (a != 0)
        {
            double x1 = (-((Math.Sqrt(b * b - (4 * a * c)) + b) / (2 * a)));
            double x2 = ((Math.Sqrt(b * b - (4 * a * c)) - b) / (2 * a));           
            Console.WriteLine("x1 = {0}, x2 = {1}", x1, x2);
        }
        else
        {
            double x3 = -(c / b);
            Console.WriteLine("x = {0}", x3);
        }             
    }
}



